package com.ruoyi.system.service.estate.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.estate.HouseMapper;
import com.ruoyi.system.domain.estate.House;
import com.ruoyi.system.service.estate.IHouseService;

/**
 * 房屋管理Service业务层处理
 * 
 * @author ruoyi
 */
@Service
public class HouseServiceImpl implements IHouseService 
{
    @Autowired
    private HouseMapper houseMapper;

    /**
     * 查询房屋信息
     * 
     * @param houseId 房屋ID
     * @return 房屋信息
     */
    @Override
    public House selectHouseById(Long houseId)
    {
        return houseMapper.selectHouseById(houseId);
    }

    /**
     * 查询房屋列表
     * 
     * @param house 房屋信息
     * @return 房屋
     */
    @Override
    public List<House> selectHouseList(House house)
    {
        return houseMapper.selectHouseList(house);
    }

    /**
     * 新增房屋
     * 
     * @param house 房屋信息
     * @return 结果
     */
    @Override
    public int insertHouse(House house)
    {
        house.setDelFlag("0");
        return houseMapper.insertHouse(house);
    }

    /**
     * 修改房屋
     * 
     * @param house 房屋信息
     * @return 结果
     */
    @Override
    public int updateHouse(House house)
    {
        return houseMapper.updateHouse(house);
    }

    /**
     * 批量删除房屋
     * 
     * @param houseIds 需要删除的房屋ID
     * @return 结果
     */
    @Override
    public int deleteHouseByIds(Long[] houseIds)
    {
        return houseMapper.deleteHouseByIds(houseIds);
    }

    /**
     * 删除房屋信息
     * 
     * @param houseId 房屋ID
     * @return 结果
     */
    @Override
    public int deleteHouseById(Long houseId)
    {
        return houseMapper.deleteHouseById(houseId);
    }
} 